#!/bin/bash
# Description: initiate network setting 
# Author: zhangchiqian@uniontech.com
# version: 1.0
# date: 2022-1-6

nmcli c add type bond ifname bond0 con-name bond0 mode 802.3ad ipv4.method disabled ipv6.method ignore
nmcli c add type bond-slave con-name bond0-slave1 ifname enp1s0f0 master bond0 autoconnect yes
nmcli c add type bond-slave con-name bond0-slave2 ifname enp2s0f0 master bond0 autoconnect yes
nmcli c add type vlan con-name bond0.202 dev bond0 id 202 ipv4.addresses 100.108.6.73/24 ipv4.gateway 100.108.6.254 ipv4.method manual autoconnect yes
nmcli c add type vlan con-name bond0.308 dev bond0 id 308 ipv4.addresses 192.168.5.173/24 ipv4.method manual autoconnect yes
#nmcli c add type vlan con-name bond0.201 dev bond0 id 201 ipv4.addresses 100.108.5.73/24 ipv4.gateway 100.108.5.254 ipv4.method manual autoconnect yes
